:root {
    --primary-color: #3f51b5;
    --accent-color: #448AFF;
    --background-color: #FF4081;
    --default-transation: ease-in-out .2s
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    max-height: 100%;
    box-sizing: border-box;
    overflow: hidden;
    font-family: Roboto, Noto, Helvetica, Arial, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
}

header {
    height: 56px;
    box-shadow: 0 2px 20px -8px rgba(0 0 0 / .25);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.title {
    width: 100%;
    text-align: center;
    margin: 0;
}

.search {
    position: absolute;
    height: 32px;
    width: 32px;
    top: 12px;
    right: 12px;
    --icon-color: #999;
}

.search:active {
    --icon-color: var(--accent-color);
}

.search::before,
.search::after {
    content: "";
    display: block;
}

.search::before {
    width: 20px;
    height: 20px;
    position: absolute;
    left: 6px;
    top: 6px;
    border-radius: 50%;
    box-sizing: border-box;
    border: solid 3px var(--icon-color);
}

.search::after {
    width: 4px;
    height: 4px;
    position: absolute;
    right: 4px;
    bottom: 4px;
    border-radius: 50%;
    box-sizing: border-box;
    background-color: var(--icon-color);
}

#app {
    display: grid;
    grid-template-rows: 0px 1fr 280px;
    flex: 0 0 auto;
    height: 100%;
    max-height: calc(100% - 56px);
    transition: var(--default-transation);
    overflow: hidden;
}

#app.open-search {
    grid-template-rows: 56px 1fr 280px;
}

.list {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overflow-y: auto;
}

.search-box {
    padding: 2px 16px 2px 4px;
    position: relative;
    width: calc(100% - 32px);
    margin: 8px 16px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 32px 1fr;
    border-radius: 32px;
    --border-color: #aaa;
    border: solid var(--border-color) 2px;
    transition: var(--default-transation);
    min-height: 40px;
    top: -56px;
    transition: var(--default-transation);
}

.open-search>.search-box {
    top: 0;
}

.search-box:focus-within {
    --border-color: var(--accent-color);
}

.search-box>.search {
    position: relative;
    left: 0px;
    top: unset;
    scale: .75;
}

.search-box input {
    border: none;
    background: transparent;
}

.actions {
    display: grid;
    width: 100%;
    grid-template-rows: 12px 64px 1fr 48px;
    grid-template-columns: 24px .3fr .4fr .3fr 24px;
    grid-template-areas:
        ". . . . ."
        ". n n n ."
        ". l o d ."
        "a a a a a"
    ;
    box-sizing: border-box;
    align-items: center;
    justify-items: center;
    box-shadow: 0 -2px 20px -4px rgba(0 0 0 / .25);
}

.list-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    justify-items: center;
    height: 100%;
    align-items: center;
    background-color: #fff;
    z-index: 0;
    grid-area: a;
    border-top: solid 1px #ddd;
}

.add-item,
.edit-list {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    transition: var(--default-transation);
}

.add-item:active,
.edit-list:active {
    background: rgba(0 0 0 / .1);
}


.edit-list {
    border-left: solid 1px #ddd;
}

.current {
    grid-area: n;
    width: 100%;
    text-align: center;
    font-size: 1.8em;
}

.late,
.ok,
.absent {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: blueviolet;
    border-radius: 50%;
    align-self: center;
    color: #fff;
    position: relative;
    --after-background: transparent;
}

.late::before,
.ok::before,
.absent::before {
    content: "";
    display: block;
    position: absolute;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    border-radius: 50%;
    border: solid #fff 2px;
}

.late:active,
.ok:active,
.absent:active {
    --after-background: rgba(0 0 0 / .25);
}

.late::after,
.ok::after,
.absent::after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--after-background);
    transition: ease-in-out .1s;
}

.late,
.absent {
    width: 84px;
    height: 84px;
    font-size: 1.2em;
}

.ok {
    font-size: 1.5em;
    width: 128px;
    height: 128px;
    grid-area: o;
    background: #5b5;
}

.absent {
    background: #d44;
    grid-area: l;
}

.late {
    background: #f85;
    grid-area: d;
}

alert-dialog {
    position: fixed;
    opacity: 0;
}